<?php
/**
 * Prado Portal.
 *
 * @author Steen Rabol <steen.rabol@gmail.com>
 * @link http://www.pradoportal.dk/
 * @copyright Copyright &copy; 2006,2007,2008 Steen Rabol
 * @license http://www.pradoportal.dk
 * @version $Id: NewsletterUserList.php 461 2011-01-16 18:04:56Z steen.rabol $
 *
 *
 */

Prado::using('Application.Portlets.Portlet');
Prado::using('Application.Portlets.THSpillerProfilPortlet.Common.THSpillerProfilPortletRecord');
class NewsletterList extends PortalAdminPage
{
	public function onInit($p)
	{
		parent::onInit($p);
	}

	public function  onLoad($param)
	{
		parent::onLoad($param);


		if(!$this->IsPostBack)
        {
			$this->dlstSpillerprofilerList->DataSource	= THSpillerProfilPortletRecord::finder()->findAll();
            $this->dlstSpillerprofilerList->dataBind();
        }
	}

	public function DeleteSpillerProfil($sender, $param)
	{
		$id = $this->dlstSpillerprofilerList->DataKeys[$param->Item->ItemIndex];
		THSpillerProfilPortletRecord::finder()->DeleteByid($id);
		$this->gotoPage($this->Service->RequestedPagePath);
	}
}
?>